package com.wm.blog.es.vo;

import com.wm.blog.es.annotation.Document;
import com.wm.blog.center.common.annotation.es.EsId;
import com.wm.blog.es.annotation.Field;
import com.wm.blog.center.common.constant.es.EsConstant;
import com.wm.blog.center.common.enums.es.AnalyzerType;
import com.wm.blog.center.common.enums.es.FieldType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: weiming
 * @Date: 2021/5/20 10:34
 * @Description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(index = EsConstant.INDEX_NAME, type = "")
public class BlogVo {

    /**
     * 主键
     */
    @EsId
    @Field(type = FieldType.KEYWORD)
    private Long id;
    /**
     * 标题
     */
    @Field(type = FieldType.TEXT, analyzer = AnalyzerType.IK_SMART)
    private String title;
    /**
     *
     */
    @Field(type = FieldType.DATE)
    private String createTime;

    @Field(type = FieldType.OBJECT)
    private MemberVo member;
}
